<template>
  <div>
    <i-notice-bar icon="systemprompt" loop>
      2021届硕士、本科毕业生将于6月24日举行毕业典礼！！！
    </i-notice-bar>
            <div class="notices">
              
            <div class="noticesList" @click="btnClick(item)" v-for="(item,index) in noticeList" :key="index">
            <div class="title" >{{ item.noticeTitle}}</div>
            <div class="time" >{{ item.createTime}}</div>
            <van-divider />
            </div>

  </div>

  </div>
</template>
<script>
import { listNotice, listNoticeClick, getNotice, updateNoticeClick } from '@/api/notice'
  export default {
      name: '',

    data(){
          return {
      noticeList: [], 
     noticeById: {}, 
      queryParams: {
        pageNum: 1,
        pageSize: 20,
        noticeTitle: undefined,
        createBy: undefined,
        status: '0'
      }
      }
    },
  mounted() {
    this.getList();
  },
  created() {},
  methods: {
    //查询列表
    getList() {
      listNotice(this.queryParams).then(response => {
        this.noticeList  = response.rows
        this.total = response.total
      })
    },

    //点击选中
    btnClick(data) {
      updateNoticeClick(data)
      console.log(data)
            this.$router.push({
        path: './noticedetail/main',
        query: {
          id: data.noticeId
        }
      })
    }
  }
}


</script>
<style scoped>
.notices{
  background-color: rgb(255, 255, 255);
  width: 95%;
  margin: 20rpx 20rpx 15rpx;
  -moz-box-shadow:2rpx 2rpx 5rpx #969696;
  -webkit-box-shadow:2rpx 2rpx 5rpx #838080;
  box-shadow:2rpx 2rpx 5rpx #969696;
  display:flex;
	padding:0 0px;
	flex-wrap:wrap;
  border-radius: 5px;
}
.noticesList{
  width: 95%;
   font-size: 12pt;
    padding: 20rpx;
}
.title{
  color: #070707;
}
.time{
   text-align: right;
   color: #35353598;
   font-size: 10pt;
}
</style>